<?php
// Newsbox default
class WPBakeryShortCode_news_box_default extends WPBakeryShortCode {

    /*
     * Thi methods returns HTML code for frontend representation of your shortcode.
     * You can use your own html markup.
     *
     * @param $atts - shortcode attributes
     * @param @content - shortcode content
     *
     * @access protected
     *
     * @return string
     */

    protected function content($atts, $content = null) {

        extract(shortcode_atts(array(
            'width' => '',
            'el_position' => '',
            'cat' => '',
            'style' => '',
        ), $atts));

        $width_class = wpb_translateColumnWidthToSpan($width); // Determine width for our div holder
	$cat = get_cat_ID($cat); 
	ob_start();
	?>
<?php if( $style == "new" ) { ?>
    <div class="newsboxs">
        <div class="box_outer">
   <div class="news_box">
            <div class="news_box_heading">
                <div class="nb_dots">
                    <h2><a href="<?php echo get_category_link($cat); ?>"><?php echo get_cat_name( $cat ); ?> </a></h2>
                </div>
            </div> <!--End nb Heading-->
        
            <div class="news_box_left">
                <?php query_posts(array('showposts' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
		<?php
		?>
                <div class="recent_news_item">
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="recent_news_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image('medium'); ?>&amp;h=153&amp;w=286&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image('medium'); 
                                $ntImage = aq_resize( $thumb, 286, 153, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="286" height="153" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="286" height="153" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="286" height="153" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='nb_video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='nb_slide_icon'></span>";
	    } elseif ($type == 'article') {
		echo "<span class='nb_article_icon'></span>";
	    }
	    ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
                <div class="recent_news_content">
		<h3 class="recent_news_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,130);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,130);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
                </div> <!--recent news Content-->
                </div> <!--recent News Item-->
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>

            </div> <!--End News Box Left-->
            <div class="news_box_right">
                <ul class="nbs_more_news">
                 <?php query_posts(array('showposts' => 4, 'offset' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nb2_next2_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=64&amp;w=64&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 64, 64, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="64" height="64" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="64" height="64" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="64" height="64" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>

			<h4><a href="<?php the_permalink(); ?>">
			    <?php the_title(); ?>
		    </a></h4>
		    		
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb2_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
                <?php if(of_get_option('post_cc') != false) { ?>
		<span class="news_comments_count"><a href="<?php comments_link(); ?>">(<?php comments_number(0, 1, '%'); ?>) <?php _e('comments', 'theme'); ?></a></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
		    </li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
    
            </div> <!--End News Box Right-->
        </div> <!--News Box-->
    </div> <!--Box Outer-->
</div> <!--Newsboxs-->
<?php } else { ?>
    <div class="box_outer">
   <div class="news_box">
            <div class="news_box_heading">
                <div class="nb_dots">
                    <h2><a href="<?php echo get_category_link($cat); ?>"><?php echo get_cat_name( $cat ); ?> </a></h2>
                </div>
            </div> <!--End nb Heading-->
        
            <div class="news_box_left">
                <?php query_posts(array('showposts' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
		<?php
		$nbImgw = of_get_option('news_box_img_w');
		$nbImgh = of_get_option('news_box_img_h');
		$nbExl = of_get_option('news_box_ex_l');
		?>
                <div class="recent_news_item">
                <h4 class="recent_news_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4>
		
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="recent_news_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=<?php echo $nbImgh; ?>&amp;w=<?php echo $nbImgw; ?>&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, $nbImgw, $nbImgh, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="<?php echo $nbImgw; ?>" height="<?php echo $nbImgh; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="<?php echo $nbImgw; ?>" height="<?php echo $nbImgh; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="<?php echo $nbImgw; ?>" height="<?php echo $nbImgh; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='nb_video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='nb_slide_icon'></span>";
	    } elseif ($type == 'article') {
		echo "<span class='nb_article_icon'></span>";
	    }
	    ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
                <div class="recent_news_content">
                <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,$nbExl);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,$nbExl);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
                <?php if(of_get_option('post_cc') != false) { ?>
		<span class="news_comments_count"><a href="<?php comments_link(); ?>">(<?php comments_number(0, 1, '%'); ?>) <?php _e('comments', 'theme'); ?></a></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
                </div> <!--recent news Content-->
                </div> <!--recent News Item-->
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>

            </div> <!--End News Box Left-->
            <div class="news_box_right">
		<div class="more_news_wrap">
		<div class="left_ul">
                <ul class="more_news">
                            <?php query_posts(array('showposts' => 3, 'offset' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><span><?php _e('&raquo;', 'theme'); ?></span>
			     
			  <?php if( is_rtl() ) { ?>
				<?php if (strlen($post->post_title) > 45) {
					    $title = get_the_title('');
					    echo wp_html_excerpt($title,45) . '...'; } else {
					the_title();
					} ?>
				<?php } else { ?>
			    <?php if (strlen($post->post_title) > 45) {
			    echo substr(the_title($before = '', $after = '', FALSE), 0, 45) . '...'; } else {
			    the_title();
			    } ?>
			    <?php } ?>

			    
		    </a></li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
		</div> <!--Left ul-->
		<div class="right_ul">
                <ul class="more_news">
                            <?php query_posts(array('showposts' => 3, 'offset' => 4, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><span><?php _e('&raquo;', 'theme'); ?></span>
			     
			  <?php if( is_rtl() ) { ?>
			  <?php if (strlen($post->post_title) > 45) {
					    $title = get_the_title('');
					    echo wp_html_excerpt($title,45) . '...'; } else {
					the_title();
					} ?>
				<?php } else { ?>
				 <?php if (strlen($post->post_title) > 45) {
			    echo substr(the_title($before = '', $after = '', FALSE), 0, 45) . '...'; } else {
			    the_title();
			    } ?>
			    <?php } ?>

			    
		    </a></li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
		</div> <!--more_news_wrap-->
		</div>
            </div> <!--End News Box Right-->
        </div> <!--News Box-->
    </div> <!--Box Outer-->
<?php } // end Style ?>			
        <?php
	$content = wpb_js_remove_wpautop(ob_get_contents());
	ob_end_clean();			
        
        $output = $this->startRow($el_position) . $content . $this->endRow($el_position);
        return '[raw]'.$output.'[/raw]';
    }
}
  
// Newsbox 2 Cols
class WPBakeryShortCode_news_box_2cols extends WPBakeryShortCode {

    protected function content($atts, $content = null) {

        extract(shortcode_atts(array(
            'width' => '',
            'el_position' => '',
            'cat' => '',
            'cat2' => '',
        ), $atts));

        $width_class = wpb_translateColumnWidthToSpan($width); // Determine width for our div holder
	$cat = get_cat_ID($cat); 
	$cat2 = get_cat_ID($cat2); 
	ob_start();
	?>
<div class="nb_col2">
    <div class="box_outer">
   <div class="news_box">
            <div class="news_box_heading">
                <div class="nb_dots">
                    <h2><a href="<?php echo get_category_link($cat); ?>"><?php echo get_cat_name( $cat ); ?> </a></h2>
                </div>
            </div> <!--End nb Heading-->
        
            <div class="news_box_left">
                <?php query_posts(array('showposts' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                <div class="recent_news_item">
                <h2 class="recent_news_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="recent_news_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=93&amp;w=93&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 93, 93, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="93" height="93" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="93" height="93" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="93" height="93" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='nb_video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='nb_slide_icon'></span>";
	    } elseif ($type == 'article') {
		echo "<span class='nb_article_icon'></span>";
	    }
	    ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
                <div class="recent_news_content">
                <p class="recent_news_excpert">
                        <?php global $post;
			if(of_get_option('html_exc') != false ) {
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,80);
			} else {
			echo $excerpt;
			}
			} else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,80);
  			}
                        ?> <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
                </div> <!--recent news Content-->
                </div> <!--recent News Item-->
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>

            </div> <!--End News Box Left-->
                <ul class="nb2_next2_news">
                 <?php query_posts(array('showposts' => 2, 'offset' => 1, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nb2_next2_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=55&amp;w=55&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 55, 55, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="55" height="55" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="55" height="55" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="55" height="55" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>

			<a href="<?php the_permalink(); ?>">
			    <?php the_title(); ?>
		    </a>
		    		
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb2_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
                <?php if(of_get_option('post_cc') != false) { ?>
		<span class="news_comments_count"><a href="<?php comments_link(); ?>">(<?php comments_number(0, 1, '%'); ?>) <?php _e('comments', 'theme'); ?></a></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
		    </li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
    
            <div class="news_box_right">
		<div class="more_news_wrap">
                <ul class="more_news">
                            <?php query_posts(array('showposts' => 2, 'offset' => 3, 'cat' => $cat )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><span><?php _e('&raquo;', 'theme'); ?></span>
			     
			  <?php if( is_rtl() ) { ?>
				<?php if (strlen($post->post_title) > 40) {
					    $title = get_the_title('');
					    echo wp_html_excerpt($title,40) . '...'; } else {
					the_title();
					} ?>
				<?php } else { ?>
			    <?php if (strlen($post->post_title) > 40) {
			    echo substr(the_title($before = '', $after = '', FALSE), 0, 40) . '...'; } else {
			    the_title();
			    } ?>
			    <?php } ?>

			    
		    </a></li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
			</div> <!--more_news_wrap-->
	    </div> <!--End News Box Right-->
        </div> <!--News Box-->
    </div> <!--Box Outer-->
</div> <!--NB COL-->

<div class="nb_col2">
    <div class="box_outer">
   <div class="news_box">
            <div class="news_box_heading">
                <div class="nb_dots">
                    <h2><a href="<?php echo get_category_link($cat2); ?>"><?php echo get_cat_name( $cat2 ); ?> </a></h2>
                </div>
            </div> <!--End nb Heading-->
        
            <div class="news_box_left">
                <?php query_posts(array('showposts' => 1, 'cat' => $cat2 )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                <div class="recent_news_item">
                <h2 class="recent_news_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="recent_news_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=93&amp;w=93&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 93, 93, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="93" height="93" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="93" height="93" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="93" height="93" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='nb_video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='nb_slide_icon'></span>";
	    } elseif ($type == 'article') {
		echo "<span class='nb_article_icon'></span>";
	    }
	    ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
                <div class="recent_news_content">
                <p class="recent_news_excpert">
                        <?php global $post;
			if(of_get_option('html_exc') != false ) {
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,80);
			} else {
			echo $excerpt;
			}
			} else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,80);
  			}
                        ?> <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
                </div> <!--recent news Content-->
                </div> <!--recent News Item-->
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>

            </div> <!--End News Box Left-->
                <ul class="nb2_next2_news">
                 <?php query_posts(array('showposts' => 2, 'offset' => 1, 'cat' => $cat2 )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nb2_next2_img">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=55&amp;w=55&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 55, 55, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="55" height="55" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="55" height="55" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="55" height="55" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>

			<a href="<?php the_permalink(); ?>">
			    <?php the_title(); ?>
		    </a>
		    		
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb2_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
                <?php if(of_get_option('post_cc') != false) { ?>
		<span class="news_comments_count"><a href="<?php comments_link(); ?>">(<?php comments_number(0, 1, '%'); ?>) <?php _e('comments', 'theme'); ?></a></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>
		    </li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
    
            <div class="news_box_right">
		<div class="more_news_wrap">
                <ul class="more_news">
                            <?php query_posts(array('showposts' => 2, 'offset' => 3, 'cat' => $cat2 )); ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><span><?php _e('&raquo;', 'theme'); ?></span>
			     
			  <?php if( is_rtl() ) { ?>
				<?php if (strlen($post->post_title) > 40) {
					    $title = get_the_title('');
					    echo wp_html_excerpt($title,40) . '...'; } else {
					the_title();
					} ?>
				<?php } else { ?>
			    <?php if (strlen($post->post_title) > 40) {
			    echo substr(the_title($before = '', $after = '', FALSE), 0, 40) . '...'; } else {
			    the_title();
			    } ?>
			    <?php } ?>

			    
		    </a></li>
                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>
			</div> <!--more_news_wrap-->
	    </div> <!--End News Box Right-->
        </div> <!--News Box-->
    </div> <!--Box Outer-->
</div> <!--NB COL-->



        <?php
	$content = wpb_js_remove_wpautop(ob_get_contents());
	ob_end_clean();			
        
        $output = $this->startRow($el_position) . $content . $this->endRow($el_position);
        return '[raw]'.$output.'[/raw]';
    }
}


// News in Pictures
class WPBakeryShortCode_news_in_pics extends WPBakeryShortCode {

    protected function content($atts, $content = null) {

        extract(shortcode_atts(array(
            'width' => '',
            'el_position' => '',
	    'display' => '',
	    'title' => 'News In Pictures',
            'cat' => '',
	    'tag' => '',
	    'count' => 14
        ), $atts));

        $width_class = wpb_translateColumnWidthToSpan($width); // Determine width for our div holder
	$cat = get_cat_ID($cat); 
	ob_start();
	?>
        <div class="box_outer">
   <div class="news_box">
            <div class="news_box_heading">
                <div class="nb_dots">
                    <h2><?php echo $title; ?></h2>
                </div>
            </div> <!--End nb Heading-->
        <div class="news_pictures">
        <ul class="news_pictures_list">
                <?php
            ?>
	    <?php if($display == 'category') { ?>
                 <?php query_posts(array('showposts' => $count, 'cat' => $cat )); ?>
	    <?php } elseif($display == 'tagf') { ?>
                 <?php query_posts(array('showposts' => $count, 'tag' => $tag )); ?>
	    <?php } else { ?>
                 <?php query_posts(array('showposts' => $count )); ?>
	    <?php } ?>
               
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

	    <?php if(mom_post_image() == false) {} else { ?>
            <li>
	    <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=70&amp;w=70&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 70, 70, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="70" height="70" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="70" height="70" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="70" height="70" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
            </li>
            <?php } //mom_post_image == false ?>
            <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
        </ul>      
        </div>  <!--news_pictures-->  
        </div> <!--News Box-->
    </div> <!--Box Outer-->
        <?php
	$content = wpb_js_remove_wpautop(ob_get_contents());
	ob_end_clean();			
        
        $output = $this->startRow($el_position) . $content . $this->endRow($el_position);
        return '[raw]'.$output.'[/raw]';
    }
}

// News in Tabs
class WPBakeryShortCode_news_in_tabs extends WPBakeryShortCode {

    protected function content($atts, $content = null) {

        extract(shortcode_atts(array(
            'width' => '',
            'el_position' => '',
	    //tab1
	    'tab1_display' => '',
	    'tab1_title' => '',
            'tab1_cat' => '',
	    'tab1_tag' => '',
	    'tab1_count' => '',
	    //tab2
	    'tab2_display' => '',
	    'tab2_title' => '',
            'tab2_cat' => '',
	    'tab2_tag' => '',
	    'tab2_count' => '',
	    //tab3
	    'tab3_display' => '',
	    'tab3_title' => '',
            'tab3_cat' => '',
	    'tab3_tag' => '',
	    'tab3_count' => '',
	    //tab4
	    'tab4_display' => '',
	    'tab4_title' => '',
            'tab4_cat' => '',
	    'tab4_tag' => '',
	    'tab4_count' => '',
	    //tab5
	    'tab5_display' => '',
	    'tab5_title' => '',
            'tab5_cat' => '',
	    'tab5_tag' => '',
	    'tab5_count' => '',
	    //tab6
	    'tab6_display' => '',
	    'tab6_title' => '',
            'tab6_cat' => '',
	    'tab6_tag' => '',
	    'tab6_count' => '',
	    //tab7
	    'tab7_display' => '',
	    'tab7_title' => '',
            'tab7_cat' => '',
	    'tab7_tag' => '',
	    'tab7_count' => '',

        ), $atts));

        $width_class = wpb_translateColumnWidthToSpan($width); // Determine width for our div holder
	$tab1_cat = get_cat_ID($tab1_cat); 
	$tab2_cat = get_cat_ID($tab2_cat); 
	$tab3_cat = get_cat_ID($tab3_cat); 
	$tab4_cat = get_cat_ID($tab4_cat); 
	$tab5_cat = get_cat_ID($tab5_cat); 
	$tab6_cat = get_cat_ID($tab6_cat); 
	$tab7_cat = get_cat_ID($tab7_cat); 
	ob_start();
	?>
<div class="nb_tabs_outer box_outer">
    <div class="news_boxes_tabs">
        <div class="custom_tabs_container">
            <ul class="custom_tabs">
            <?php if($tab1_title != '') { ?>
                <li><a href="#"><?php echo $tab1_title; ?></a></li>
            <?php } ?>
            <?php if($tab2_title != '') { ?>
                <li><a href="#"><?php echo $tab2_title; ?></a></li>
            <?php } ?>
            <?php if($tab3_title != '') { ?>
                <li><a href="#"><?php echo $tab3_title; ?></a></li>
            <?php } ?>
            <?php if($tab4_title != '') { ?>
                <li><a href="#"><?php echo $tab4_title; ?></a></li>
            <?php } ?>
            <?php if($tab5_title != '') { ?>
                <li><a href="#"><?php echo $tab5_title; ?></a></li>
            <?php } ?>
            <?php if($tab6_title != '') { ?>
                <li><a href="#"><?php echo $tab6_title; ?></a></li>
            <?php } ?>
            <?php if($tab7_title != '') { ?>
                <li><a href="#"><?php echo $tab7_title; ?></a></li>
            <?php } ?>
            </ul>
            <div class="custom_tabs_wrap">
            <?php if($tab1_title != '') { ?>
                <div class="custom_tabs_content">
                <ul class="nbtabs_content">
	    <?php if($tab1_display == 'tab1_category') { ?>
                 <?php query_posts(array('showposts' => $tab1_count, 'cat' => $tab1_cat )); ?>
	    <?php } elseif($tab1_tag ==  'tab1_tagf') { ?>
                 <?php query_posts(array('showposts' => $tab1_count, 'tag' => $tab1_tag )); ?>
	    <?php } else { ?>
                 <?php query_posts(array('showposts' => $tab1_count )); ?>
	    <?php } ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nt_image">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=73&amp;w=100&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 100, 73, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
            <h3 class="nt_post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                            <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,150);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,150);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>

                    </li>     

                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>

                </div>
            <?php } ?>

            <?php if($tab2_title != '') { ?>
                <div class="custom_tabs_content">
                <ul class="nbtabs_content">
	    <?php if($tab2_display == 'tab2_category') { ?>
                 <?php query_posts(array('showposts' => $tab2_count, 'cat' => $tab2_cat )); ?>
	    <?php } elseif($tab2_tag ==  'tab2_tagf') { ?>
                 <?php query_posts(array('showposts' => $tab2_count, 'tag' => $tab2_tag )); ?>
	    <?php } else { ?>
                 <?php query_posts(array('showposts' => $tab2_count )); ?>
	    <?php } ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nt_image">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=73&amp;w=100&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 100, 73, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
            <h3 class="nt_post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                            <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,150);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,150);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>

                    </li>     

                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>

                </div>
            <?php } ?>

            <?php if($tab3_title != '') { ?>
                <div class="custom_tabs_content">
                <ul class="nbtabs_content">
	    <?php if($tab3_display == 'tab3_category') { ?>
                 <?php query_posts(array('showposts' => $tab3_count, 'cat' => $tab3_cat )); ?>
	    <?php } elseif($tab3_tag ==  'tab3_tagf') { ?>
                 <?php query_posts(array('showposts' => $tab3_count, 'tag' => $tab3_tag )); ?>
	    <?php } else { ?>
                 <?php query_posts(array('showposts' => $tab3_count )); ?>
	    <?php } ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nt_image">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=73&amp;w=100&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 100, 73, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
            <h3 class="nt_post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                            <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,150);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,150);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>

                    </li>     

                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>

                </div>
            <?php } ?>

            <?php if($tab4_title != '') { ?>
                <div class="custom_tabs_content">
                <ul class="nbtabs_content">
	    <?php if($tab4_display == 'tab4_category') { ?>
                 <?php query_posts(array('showposts' => $tab4_count, 'cat' => $tab4_cat )); ?>
	    <?php } elseif($tab4_tag ==  'tab4_tagf') { ?>
                 <?php query_posts(array('showposts' => $tab4_count, 'tag' => $tab4_tag )); ?>
	    <?php } else { ?>
                 <?php query_posts(array('showposts' => $tab4_count )); ?>
	    <?php } ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nt_image">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=73&amp;w=100&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 100, 73, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
            <h3 class="nt_post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                            <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,150);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,150);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>

                    </li>     

                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>

                </div>
            <?php } ?>

            <?php if($tab5_title != '') { ?>
                <div class="custom_tabs_content">
                <ul class="nbtabs_content">
	    <?php if($tab5_display == 'tab5_category') { ?>
                 <?php query_posts(array('showposts' => $tab5_count, 'cat' => $tab5_cat )); ?>
	    <?php } elseif($tab5_tag ==  'tab5_tagf') { ?>
                 <?php query_posts(array('showposts' => $tab5_count, 'tag' => $tab5_tag )); ?>
	    <?php } else { ?>
                 <?php query_posts(array('showposts' => $tab5_count )); ?>
	    <?php } ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nt_image">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=73&amp;w=100&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 100, 73, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
            <h3 class="nt_post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                            <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,150);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,150);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>

                    </li>     

                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>

                </div>
            <?php } ?>

            <?php if($tab6_title != '') { ?>
                <div class="custom_tabs_content">
                <ul class="nbtabs_content">
	    <?php if($tab6_display == 'tab6_category') { ?>
                 <?php query_posts(array('showposts' => $tab6_count, 'cat' => $tab6_cat )); ?>
	    <?php } elseif($tab6_tag ==  'tab6_tagf') { ?>
                 <?php query_posts(array('showposts' => $tab6_count, 'tag' => $tab6_tag )); ?>
	    <?php } else { ?>
                 <?php query_posts(array('showposts' => $tab6_count )); ?>
	    <?php } ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nt_image">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=73&amp;w=100&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 100, 73, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
            <h3 class="nt_post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                            <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,150);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,150);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>

                    </li>     

                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>

                </div>
            <?php } ?>

            <?php if($tab7_title != '') { ?>
                <div class="custom_tabs_content">
                <ul class="nbtabs_content">
	    <?php if($tab7_display == 'tab7_category') { ?>
                 <?php query_posts(array('showposts' => $tab7_count, 'cat' => $tab7_cat )); ?>
	    <?php } elseif($tab7_tag ==  'tab7_tagf') { ?>
                 <?php query_posts(array('showposts' => $tab7_count, 'tag' => $tab7_tag )); ?>
	    <?php } else { ?>
                 <?php query_posts(array('showposts' => $tab7_count )); ?>
	    <?php } ?>
                <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <li>
	    <?php if(mom_post_image() == false) {} else { ?>
	    <div class="nt_image">
	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=73&amp;w=100&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 100, 73, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="100" height="73" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
	    </a>
	    </div>
	    <?php } //mom_post_image == false ?>
            <h3 class="nt_post_title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
                            <p class="recent_news_excpert">
		    <?php
		 if(of_get_option('html_exc') != false ) {
		    global $post;
			$excerpt = $post->post_excerpt;
			$contentex = get_the_content('');
			if($excerpt==''){
			    echo wp_html_excerpt($contentex,150);
			} else {
			echo $excerpt;
			}
		 } else {
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,150);
		    
		 }
		        ?>
 <a class="nb_recent_more" href="<?php the_permalink(); ?>"><?php _e('more', 'theme'); ?></a> ... 
                </p>
		<?php if(of_get_option('post_meta') != false) { ?>
		<div class="nb_meta">
		<?php if(of_get_option('post_date') != false) { ?>
                <span class="news_date"><?php the_time(of_get_option('date_format')); ?></span>
		<?php } ?>
		</div> <!--End NB META-->
		<?php } ?>

                    </li>     

                <?php endwhile; ?>
                <?php  else:  ?>
                <!-- Else in here -->
                <?php  endif; ?>
                <?php wp_reset_query(); ?>
                </ul>

                </div>
            <?php } ?>

            </div> <!--Tab Wrap-->
        </div> <!--Tab Container-->
    </div> <!--End Nb Tabs-->
    </div> <!--Nt tabs Outer-->
        <?php
	$content = wpb_js_remove_wpautop(ob_get_contents());
	ob_end_clean();			
        
        $output = $this->startRow($el_position) . $content . $this->endRow($el_position);
        return '[raw]'.$output.'[/raw]';
    }
}

// Feature Slider
class WPBakeryShortCode_mom_feature_slider extends WPBakeryShortCode {

    protected function content($atts, $content = null) {

        extract(shortcode_atts(array(
            'width' => '',
            'el_position' => '',
            'style' => '',
	    'display' => '',
	    'cat' => '',
	    'tag' => ''
        ), $atts));

	$cat = get_cat_ID($cat); 
        $width_class = wpb_translateColumnWidthToSpan($width); // Determine width for our div holder
	ob_start();
	?>
	    <?php   if($style == 'full') { ?>
	
	<script type="text/javascript">
	  jQuery.noConflict();
	  jQuery(document).ready(function ($){

// main slider
   $('.slider').cycle({
    fx: '<?php echo of_get_option('cycle_effect'); ?>',
    easing: '<?php echo of_get_option('cycle_ease'); ?>',
    speed: <?php echo of_get_option('cycle_speed'); ?>,
     timeout:<?php echo of_get_option('cycle_timeout'); ?>,
            pause: 1,
	    <?php if(of_get_option('cycle_effect') == 'fade') {?> 
	    speedIn:  1000, 
	    speedOut: 1000,
	    <?php } ?>
            cleartype: true,
            cleartypeNoBg: true,
            pager: 'ul.slider_nav',
		slideExpr: '.slider_item',
		slideResize: 0,
	    after: feature_after,
	    before: onbefore,
            pagerAnchorBuilder: function(idx, slide) {
                return 'ul.slider_nav li:eq(' + (idx) + ')';
            }
        });
  $('ul.slider_nav li, .slider_items').hover(function() { 
            $('.slider').cycle('pause'); 
        }, function () {
            $('.slider').cycle('resume'); 
	  });


  function feature_after() {
$('.slider_items .slider_caption').stop().animate({opacity:1, bottom:0},{queue:false,duration:300 });
$('.feature_video_icon, .feature_slide_icon, .feature_article_icon').stop().animate({top:0},{queue:true,duration:300});  
       }
   
  function onbefore() {
   $('.slider_items .slider_caption').stop().animate({opacity:1, bottom:'-120px'},{queue:false,duration:300});
   $('.feature_video_icon, .feature_slide_icon, .feature_article_icon').animate({top:'-40px'},{queue:true,duration:300});  
    }  
  
//slider nav
jQuery('.slider_nav li:not(.activeSlide) a').click( 
		function () {
			jQuery('.slider_nav li a').css('opacity', 0.7);
			jQuery(this).css('opacity', 1);
		}
	);
	

jQuery('.slider_nav li:not(.activeSlide) a').hover( 
		function () {
			jQuery(this).stop(true, true).animate({opacity: 1}, 300);
		}, function () {
			jQuery(this).stop(true, true).animate({opacity: 0.7}, 300);
		}
	);

  });
</script>
<div class="box_outer" id="feature_outer">
    <div class="Feature_news">
	<div class="slider_wrap">
                <div class="slider_items">
                    <div class="slider slider_full">
		    <img class="dummy_slide" src="<?php echo MOM_IMG; ?>/dummy.gif" width="942px" height="380">
		    <?php if ($display == 'category') { ?>
                    <?php query_posts(array('showposts' => 11, 'cat' => $cat )); ?>
		    <?php } elseif ($display == 'tagf') { ?>
                    <?php query_posts(array('showposts' => 11, 'tag' => $tag )); ?>
		    <?php } else { ?>
                       <?php query_posts(array('showposts' => 11)); ?>
		    <?php } ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    <div class="slider_item slider_item_full">
	<div style="position:relative; overflow:hidden;">

	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image('large'); ?>&amp;h=380&amp;w=942&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image('large'); 
                                $ntImage = aq_resize( $thumb, 942, 380, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="942" height="380" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="942" height="380" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="942" height="380" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
            <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='feature_video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='feature_slide_icon'></span>";
	    } elseif ($type == 'article') {
		echo "<span class='feature_article_icon'></span>";
	    }
	    ?>
	    </a>
                        <div class="slider_caption">
			    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                            <p>
                        <?php global $post;
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,180);
                        ?> ... 
                            </p>
                        </div> <!--End Slider Caption-->
                        	</div>

                    </div> <!--Slider Item-->
<?php endwhile; ?>
<?php  else:  ?>
<!-- Else in here -->
<?php  endif; ?>
<?php wp_reset_query(); ?>
                    </div> <!--Slider-->
                </div> <!--Slider Items-->
                <ul class="slider_nav slider_nav_full">
		    <?php if ($display == 'category') { ?>
                    <?php query_posts(array('showposts' => 11, 'cat' => $cat )); ?>
		    <?php } elseif ($display == 'tagf') { ?>
                    <?php query_posts(array('showposts' => 11, 'tag' => $tag )); ?>
		    <?php } else { ?>
                       <?php query_posts(array('showposts' => 11)); ?>
		    <?php } ?>
        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
            <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?>

                    <li>
                        <a href="#">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=59&amp;w=74&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 74, 59, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="74" height="59" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="74" height="59" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="74" height="59" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
                        </a>
                    </li>
        <?php endwhile; ?>
        <?php  else:  ?>
        <!-- Else in here -->
        <?php  endif; ?>
        <?php wp_reset_query(); ?>
                </ul>
            <div class="clear"></div>
	</div> <!--Slider_wrap-->
        </div> <!--End Feature news-->
</div> <!--End Feature Outer-->

<?php } else { ?>
	<script type="text/javascript">
	  jQuery.noConflict();
	  jQuery(document).ready(function ($){

// main slider
   $('.slider').cycle({
    fx: '<?php echo of_get_option('cycle_effect'); ?>',
    easing: '<?php echo of_get_option('cycle_ease'); ?>',
    speed: <?php echo of_get_option('cycle_speed'); ?>,
     timeout:<?php echo of_get_option('cycle_timeout'); ?>,
            pause: 1,
	    <?php if(of_get_option('cycle_effect') == 'fade') {?> 
	    speedIn:  1000, 
	    speedOut: 1000,
	    <?php } ?>
            cleartype: true,
            cleartypeNoBg: true,
            pager: 'ul.slider_nav',
		slideExpr: '.slider_item',
		slideResize: 0,
	    after: feature_after,
	    before: onbefore,
            pagerAnchorBuilder: function(idx, slide) {
                return 'ul.slider_nav li:eq(' + (idx) + ')';
            }
        });
  $('ul.slider_nav li, .slider_items').hover(function() { 
            $('.slider').cycle('pause'); 
        }, function () {
            $('.slider').cycle('resume'); 
	  });


  function feature_after() {
$('.slider_items .slider_caption').stop().animate({opacity:1, bottom:0},{queue:false,duration:300 });
$('.feature_video_icon, .feature_slide_icon, .feature_article_icon').stop().animate({top:0},{queue:true,duration:300});  
       }
   
  function onbefore() {
   $('.slider_items .slider_caption').stop().animate({opacity:1, bottom:'-120px'},{queue:false,duration:300});
   $('.feature_video_icon, .feature_slide_icon, .feature_article_icon').animate({top:'-40px'},{queue:true,duration:300});  
    }  
  
//slider nav
jQuery('.slider_nav li:not(.activeSlide) a').click( 
		function () {
			jQuery('.slider_nav li a').css('opacity', 0.7);
			jQuery(this).css('opacity', 1);
		}
	);
	

jQuery('.slider_nav li:not(.activeSlide) a').hover( 
		function () {
			jQuery(this).stop(true, true).animate({opacity: 1}, 300);
		}, function () {
			jQuery(this).stop(true, true).animate({opacity: 0.7}, 300);
		}
	);

  });
</script>
<div class="box_outer" id="feature_outer">
    <div class="Feature_news">
	<div class="slider_wrap">
                <div class="slider_items">
                    <div class="slider">
		    <img class="dummy_slide" src="<?php echo MOM_IMG; ?>/dummy.gif" width="630px" height="340">
			
		    <?php if ($display == 'category') { ?>
                    <?php query_posts(array('showposts' => 7, 'cat' => $cat )); ?>
		    <?php } elseif ($display == 'tagf') { ?>
                    <?php query_posts(array('showposts' => 7, 'tag' => $tag )); ?>
		    <?php } else { ?>
                       <?php query_posts(array('showposts' => 7)); ?>
		    <?php } ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                    
		    <div class="slider_item">
	<div style="position:relative; overflow:hidden;">

	    <a href="<?php the_permalink(); ?>">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image('large'); ?>&amp;h=340&amp;w=615&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image('large'); 
                                $ntImage = aq_resize( $thumb, 615, 340, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="615" height="340" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="615" height="340" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="615" height="340" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
            <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='feature_video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='feature_slide_icon'></span>";
	    } elseif ($type == 'article') {
		echo "<span class='feature_article_icon'></span>";
	    }
	    ?>
	    </a>
                       <div class="slider_caption">
			<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
                        <p>
                        <?php global $post;
			$excerpt = $post->post_excerpt;
			if($excerpt==''){
			$excerpt = get_the_content('');
			}
			echo wp_html_excerpt($excerpt,180);
                        ?> ... 
                            </p>
                        </div> <!--End Slider Caption-->
                        	</div>

                    </div> <!--Slider Item-->
<?php endwhile; ?>
<?php  else:  ?>
<!-- Else in here -->
<?php  endif; ?>
<?php wp_reset_query(); ?>
                    </div> <!--Slider-->
                </div> <!--Slider Items-->
                <ul class="slider_nav slider_nav_main">
		    <?php if ($display == 'category') { ?>
                    <?php query_posts(array('showposts' => 7, 'cat' => $cat )); ?>
		    <?php } elseif ($display == 'tagf') { ?>
                    <?php query_posts(array('showposts' => 7, 'tag' => $tag )); ?>
		    <?php } else { ?>
                       <?php query_posts(array('showposts' => 7)); ?>
		    <?php } ?>
        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
            <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); ?>

                    <li>
                        <a href="#">
	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=59&amp;w=76&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 76, 59, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="76" height="59" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="76" height="59" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="76" height="59" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>
                        </a>
                    </li>
        <?php endwhile; ?>
        <?php  else:  ?>
        <!-- Else in here -->
        <?php  endif; ?>
        <?php wp_reset_query(); ?>
                </ul>
 
            <div class="clear"></div>
	</div> <!--Slider_wrap-->
        </div> <!--End Feature news-->
</div> <!--End Feature Outer-->
<?php } ?>
        <?php
	$content = wpb_js_remove_wpautop(ob_get_contents());
	ob_end_clean();			
        
        $output = $this->startRow($el_position) . $content . $this->endRow($el_position);
        return '[raw]'.$output.'[/raw]';
    }
}


// Scroling Box
class WPBakeryShortCode_mom_scroll_box extends WPBakeryShortCode {

    protected function content($atts, $content = null) {

        extract(shortcode_atts(array(
            'width' => '',
            'el_position' => '',
            'count' => '',
            'display' => '',
            'title' => '',
        ), $atts));

        $width_class = wpb_translateColumnWidthToSpan($width); // Determine width for our div holder
	ob_start();
	?>
	<script type="text/javascript">
jQuery(document).ready(function($) {
//latest vids wrap
var vids = $(".lates_video_item");
for(var i = 0; i < vids.length; i+=4) {
  vids.slice(i, i+4).wrapAll('<div class="four_items"></div>');
}

//latest news video
   $('.scroll_items').cycle({
    <?php if( is_rtl() ) { ?>
    fx: 'scrollRight',
    <?php } else { ?>
    fx: 'scrollHorz',
    <?php } ?>
    easing: 'swing',
	slideExpr: '.four_items',
	slideResize: 0,
	speed: <?php echo of_get_option('latest_video_speed'); ?>,
    <?php if (of_get_option('latest_video_auto') != false ) { ?>
     timeout:<?php echo of_get_option('latest_video_auto_time'); ?>,
    <?php } else { ?>
     timeout:0,
    <?php } ?>
            pause: 1,
            cleartype: true,
            cleartypeNoBg: true,
            pager: '.navi .navi_links'
        });
   
}); 
</script>
<div class="box_outer">
        <div class="lates_video_news news_box" style="padding: 0;">
                    <div class="news_box_heading" style="margin: 0; border-bottom: none;">
		<div class="nb_dots">
                    <h2><?php echo $title; ?></h2>
		</div>
          </div>

            <div class="latest_vids_wrap">
            <div class="scrollable" id="scrolling_vids">   
    
             <!-- root element for the items -->
             <div class="scroll_items">
		<?php  $sOrder = of_get_option('latest_video_order'); ?>
        <?php if ($display == 'videos') { ?>
        <?php query_posts(array(  'showposts' => $count, 'meta_key' => 'mom_article_type', 'meta_value' => 'video', 'orderby' => $sOrder  )); ?>
        <?php } elseif ($display == 'slides') { ?>
        <?php query_posts(array(  'showposts' => $count, 'meta_key' => 'mom_article_type', 'meta_value' => 'slideshow', 'orderby' => $sOrder )); ?>
        <?php } ?>
	<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
                   <div class="lates_video_item">

		<a href="<?php the_permalink(); ?>">
   	    <?php $timthumb = of_get_option('timthumb');
		    if ($timthumb == true) { ?>
                <img src="<?php echo MOM_SCRIPTS ?>/timthumb.php?src=<?php echo mom_post_image(); ?>&amp;h=152&amp;w=213&amp;zc=1" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		<?php } else { ?>
		            <?php 
                                $thumb = mom_post_image(); 
                                $ntImage = aq_resize( $thumb, 132, 94, true );
                            ?>
		    <?php if (strpos(mom_post_image(), 'youtube')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="132" height="94" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
			
		    <?php } elseif (strpos(mom_post_image(), 'vimeo')) { ?>
			<img src="<?php echo mom_post_image(); ?>" width="132" height="94" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } elseif (strpos(mom_post_image(), 'dailymotion')) {?>
			<img src="<?php echo mom_post_image(); ?>" width="132" height="94" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    
		    <?php } else { ?>
			<img src="<?php echo $ntImage; ?>"  alt="<?php the_title(); ?>" title="<?php the_title(); ?>" />
		    <?php } ?>
		<?php } ?>

                <?php
	    global $post;
	    $type = get_post_meta($post->ID, 'mom_article_type', true);
	    if ($type == 'video') {
		echo "<span class='video_icon'></span>";
	    } elseif ($type == 'slideshow') {
		echo "<span class='slide_icon'></span>";
	    }
	    ?>
		</a>

        <p>
         	    <a href="<?php the_permalink(); ?>">
			<?php if( is_rtl() ) { ?>
					<?php if (strlen($post->post_title) > 50) {
					    $title = get_the_title('');
					    echo wp_html_excerpt($title,50) . '...'; } else {
					the_title();
					} ?>
				<?php } else { ?>
			    <?php if (strlen($post->post_title) > 55) {
			    echo substr(the_title($before = '', $after = '', FALSE), 0, 55) . '...'; } else {
			    the_title();
			    } ?>
			    <?php } ?>
                    </a>
        </p>
        </div><!--lates_video_item-->
            <?php endwhile; ?>

            <?php  else:  ?>
            <!-- Else in here -->
            <?php  endif; ?>
            <?php wp_reset_query(); ?>

              </div> <!--End Items-->
           </div> <!--End scrollable-->
            </div> <!--Latest Vids Wrap-->
            <div class="navi"><div class="navi_links"></div></div>
        </div><!--Latest Video News-->
</div> <!--Box Outer-->
        <?php
	$content = wpb_js_remove_wpautop(ob_get_contents());
	ob_end_clean();			
        
        $output = $this->startRow($el_position) . $content . $this->endRow($el_position);
        return '[raw]'.$output.'[/raw]';
    }
}

// Blog Post
class WPBakeryShortCode_mom_blog_posts extends WPBakeryShortCode {

    protected function content($atts, $content = null) {

        extract(shortcode_atts(array(
            'width' => '',
            'el_position' => '',
	    'display' => '',
            'cat' => '',
            'count' => '',
	    'pagi' => ''
        ), $atts));

        $width_class = wpb_translateColumnWidthToSpan($width); // Determine width for our div holder
	ob_start();
	$cat = get_cat_ID($cat); 
	?>
	<?php global $paged; ?>

	    <?php if($display == 'category') { ?>
                 <?php query_posts(array('showposts' => $count, 'cat' => $cat, 'paged' => $paged )); ?>
	    <?php } else { ?>
		<?php query_posts(array('showposts' => $count, 'paged' => $paged)); ?>
	    <?php } ?>

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php cat_article(); ?>
<?php endwhile; ?>
<?php  else:  ?>
<!-- Else in here -->
<?php  endif; ?>
<?php if( $pagi == 'yes' ) { mom_pagination(); } ?>
<?php wp_reset_query(); ?>

        <?php
	$content = wpb_js_remove_wpautop(ob_get_contents());
	ob_end_clean();			
        
        $output = $this->startRow($el_position) . $content . $this->endRow($el_position);
        return '[raw]'.$output.'[/raw]';
    }
}


// Banner Block
class WPBakeryShortCode_mom_ad_block extends WPBakeryShortCode {

    protected function content($atts, $content = null) {

        extract(shortcode_atts(array(
            'width' => '',
            'el_position' => '',
	    'image' => '',
            'url' => '',
            'code' => '',
        ), $atts));

        $width_class = wpb_translateColumnWidthToSpan($width); // Determine width for our div holder
	ob_start();
	?>
	<?php $image = wp_get_attachment_url( $image ); ?>
    <div class="box_banner" style="text-align: center;">
	<?php if ($code != '' ) { ?>
	<?php echo $code; ?>
	<?php } else { ?>
	    <?php if($image != '') { ?>
	       <a href="<?php echo $url; ?>"><img src="<?php echo $image; ?>" alt=""></a>
	    <?php } else { ?>
	       <a href="#"><img src="<?php echo MOM_IMG; ?>/box_banner.png" alt=""></a>
	    <?php } ?>
	<?php } ?>
    </div>
        <?php
	$content = wpb_js_remove_wpautop(ob_get_contents());
	ob_end_clean();			
        
        $output = $this->startRow($el_position) . $content . $this->endRow($el_position);
        return '[raw]'.$output.'[/raw]';
    }
}



?>